package cn.bocweb.spinning.view.common;

import android.content.Context;

import com.lidroid.xutils.DbUtils;

import cn.bocweb.spinning.util.MyApplication;

/**
 * Created by Administrator on 2016/12/2.
 */

public class MyDbHelper {
    public static DbUtils db = null;

    public static DbUtils getDbInstance(Context context) {

        if (context == null) {
            context = MyApplication.getInstance();
        }
        if (db == null) {
            db = DbUtils.create(context, "spinningschool.db");
        }
        db.configAllowTransaction(true);
        return db;
    }
}
